<style>
    .latest-blogs-container {
        border-bottom: 2px solid #bf9e50;
        clear: both;
        margin-bottom: 39px;
        text-align: left;
        padding: 0 0 30px 0;
    }
    .latest-blogs-row {
        position: relative;
        margin-top: -30px;
        margin-right: -15px;
        margin-left: -15px;
    }
    .latest-blog-thumb-holder {
        padding-top: 5px;
        border: 1px solid #bf9e50;
        text-align: -webkit-center;
        width: 100%;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        position: relative;
    }

    .latest-blog-thumb-holder img {
        object-fit: cover;
        display: block;
        border-radius: 10px;
    }
    .latest-blog-media-body {
        position: absolute;
        z-index: 2;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        cursor: pointer;
    }
    .latest-blog-bottom {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
    }
    .latest-blog-date {
        display: inline-block;
        font-size: 12px;
        font-weight: bold;
        border-bottom: 1px solid rgba(255, 255, 255, .2);
    }
    .latest-blog-title {
        padding: 3px 20px 3px 20px;
        margin: 0;
        font-size: 13px;
        line-height: 23px;
        font-family: Poppins, sans-serif;
        text-transform: none;
        font-weight: 500;
        color: #000;
        text-decoration: none;
        transition: color 0.2s ease-in;
    }
    .latest-blog-title:hover {
        color: #bf9e50;
    }
</style>

{% if (position == 'footer_bottom' or position == 'footer' or position == 'footer_top' or position == 'footer_left' or position == 'footer_right' or position == 'customfooter_top' or position == 'customfooter_bottom' or position == 'customfooter') %}
    <div class="col-sm-12 hidden-xs" style="text-align: center;">
        <h4>{{ module['content']['title'] }}</h4>
        <div class="strip-line"></div>
    </div>

    <div class="box-content latest-blogs-container">
        <div class="news v1 row latest-blogs-row">
            {% for article in module['content']['articles'] %}
                <div class="col-sm-3 col-xs-6 latest-blog-col">
                    <div class="media">
                        <div class="latest-blog-thumb-holder"><img alt="{{ article['title'] }}" src="{{ article['thumb'] }}"></div>
                        <div class="latest-blog-media-body" onclick="window.location.href='{{ article['href'] }}'">
                            <div class="latest-blog-bottom">
                                <div class="latest-blog-date">{{ article['date_published'] }}</div>
                                <h5 class="latest-blog-title">{{ article['title'] }}</h5>
                            </div>
                        </div>
                    </div>
                </div>
            {% endfor %}
        </div>
    </div>
{% else %}
    <div class="box">
        <div class="box-heading">{{ module['content']['title'] }}</div>
        <div class="strip-line"></div>
        <div class="box-content">
            <div class="clearfix" style="clear: both">
                <div class="advanced-grid-latest-blogs">
                    {% for article in module['content']['articles'] %}
                        <div class="news clearfix">
                            <div class="image">
                                {% if (article['thumb']) %}
                                    <a href="{{ article['href'] }}" style="background-image: url({{ article['thumb'] }}); width: {{ module['content']['width'] }}px; height: {{ module['content']['height'] }}px;"></a>
                                {% endif %}
                            </div>
                            <div class="title"><a href="{{ article['href'] }}">{{ article['title'] }}</a></div>
                            {% if (article['date_published']) %}
                                <div class="article-date-added"><i class="fa fa-calendar"></i> {{ theme_options.date('m d Y', theme_options.strtotime(article['date_published'])) }}</div>
                            {% endif %}
                        </div>
                    {% endfor %}
                </div>
            </div>
        </div>
    </div>
{% endif %}
